﻿@using AMing.Mvc4.Core.Extension;
@helper Nav(string title, string url, int thisindex, int pageindex)
{
    if (thisindex == pageindex)
    {
    <text>
    <span class="nav_select">@(title)</span>
    </text>
    }
    else
    {
    <text>
    <a href="@(url)">@(title)</a>
    </text>
    }
}
@{
    string pageindex_s = ViewBag.NavIndex;

    var pageindex = pageindex_s.To<int>(0);
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    <link rel="shortcut icon" href="icon.jpg">

    @Styles.Render("~/css/default/main")
    @RenderSection("styles", required: false)
</head>
<body>
    <div class="main">
        <div id="main_nav">
            <div id="main_nav_bg">
            </div>
            <div id="main_nav_menu">
                <ul>
                    <li>
                        @Nav("首页", "http://www.y2443.com", 0, pageindex)
                    </li>
                    <li>
                        @Nav("Moepet", "http://moepet.y2443.com", 1, pageindex)
                    </li>
                    <li>
                        @Nav("Soft", "http://soft.y2443.com", 2, pageindex)
                    </li>
                    <li>
                        @Nav("Test1", "http://test1.y2443.com", 3, pageindex)
                    </li>
                </ul>
            </div>
        </div>
        <div class="top_space"></div>
        <div class="main_content">
            <div class="content_frame">
                <div class="content_frame_head">
                    <div class="content_frame_head_bg">
                        <div class="content_frame_head_title">
                            Tilte
                        </div>
                    </div>
                    <div class="content_frame_head_avatar">
                        <div class="content_frame_head_avatar_img">
                            <div class="content_frame_head_avatar_title">
                                MapleWorld
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line"></div>
                <div class="main_content_ajax">

                    @RenderBody()

                </div>
                <div class="line"></div>
                <div class="main_footer">
                    <div class="copyright">
                        Copyright © 2013 <a href="http://www.y2443.com/">www.y2443.com</a>, All Rights Reserved
                    <a href="http://www.miibeian.gov.cn/" target="_blank">闽ICP备12002923号</a>
                    </div>
                    <div class="tongji">
                        <script type="text/javascript">
                            var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
                            document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb16fa4783eb0e3c44cdcdc63682a16ff' type='text/javascript'%3E%3C/script%3E"));
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @{
        int column_count = System.DateTime.Now.Minute / 6;
        int rom_count = System.DateTime.Now.Hour / 4;

        column_count = column_count == 0 ? 1 : column_count;
        rom_count = rom_count == 0 ? 1 : rom_count;
    }
    <div class="hidden_data">
        <input id="hidden_imghostname" type="hidden" value="@(AMing.Mvc4.Data.Config.ImageHostName)" />
        <input id="hidden_nav_slide_column_count" type="hidden" value="40" />
        <input id="hidden_nav_slide_rom_count" type="hidden" value="1" />
        <input id="hidden_nav_slide_change_time" type="hidden" value="5400" />

    </div>
    @Scripts.Render("~/js/jquery")
    @Scripts.Render("~/js/defalut/index")
    @Scripts.Render("~/js/defalut/main_index")
    @RenderSection("scripts", required: false)
</body>
</html>
